The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have found their way into just about every aspect of the American life style. One reason for this proliferation is the ability of computer systems to perform a variety of tasks in an efficient manner. The mechanisms used by computer systems to perform these tasks are called computer programs.
Like computer systems themselves, the development of computer programs has evolved over the years. The EDVAC system used what was called a "one address" computer programming language. This language allowed for only the most rudimentary computer programs. By the early 1950s, scientists had developed mechanisms which could convert symbolic instructions that were reasonably understandable to humans into a form which could be understood by a computer system. Each computer system was designed to handle a specific group of these instructions. These groups of instructions are called instruction sets.
The next step in the development of computer programs was the notion of computer programming languages. Computer programming languages were even more understandable than symbolic instruction sets. Computer programs are written using a variety of computer programming languages. Once written, a computer program is compiled into instructions that are part of the instruction set of a particular computer system. FORTRAN is usually cited as one of the first languages to allow computer programs to be written independently of a particular instruction set. By the 1960s, improvements in computer programming languages led to computer programs that were so large and complex that it was difficult to manage and control their development and maintenance.
Hence, in the 1970s, focus was directed away from developing new programming languages towards the development of programming methodologies and environments which could better accommodate the increasing complexity and cost of large computer programs. One such methodology is the Object Oriented Programming (OOP) approach. OOP advocates claim that this approach to computer programming can improve the productivity of computer programmers by as much as twenty-five fold. Hence, while it has been some time since the OOP concept was originally developed, it is currently seen as the way of the future.
Three of the more fundamental concepts of OOP are "encapsulation" "inheritance," and "reusability." Encapsulation means that information and the means for using the information are conceptually packaged into individual entities called "objects." The information contained in an object is called data and the means used to perform a particular operation upon the information is called a method. The objects represent individual operations or groups of operations that can be performed by a computer system. The idea of reusability is that the objects are made sufficiently generic so that they can be used by the methods of many other objects. Any program or method program that uses an object is said to be a client of that object (i.e., a client program). The client will call or invoke the object while specifying the method that is to be used.
Objects are also considered to be members of a particular "class" of objects. When objects are created they may be members of a particular class or they may be considered to be members of a subclass of a particular class. Objects that are created as members of a subclass are said to have "inherited" the characteristics (i.e., the data and methods) of the class to which they are a subclass (i.e., their super class). For example, consider a class of objects called Vehicle. The class will have data that describes objects of that class (i.e., name, color, weight, owner, etc.) The class will also have methods defined which can be used to work with the data of the class. A subclass of class Vehicle, class RoadVehicle, could further refine class Vehicle to include data that indicated what type of Vehicle was involved (e.g., by adding attributes such as number-of-wheels). Similarly, a class called WaterVehicle could refine class Vehicle to include attributes such as displacement and draft. Now, for example, a object of class RoadVehicle could be created that had name Boomer, color Red, Weight 4000 lbs and owner Steve. Similarly, we could create objects of class WaterVehicle which represented specific boats. As subclasses are added, a hierarchical tree structure is created. Each class, be it respectively referred to as a subclass or super class, is considered to be at a certain level in the hierarchical structure. In the example, class RoadVehicle and class WaterVehicle, as subclasses of class Vehicle, would be at a level one greater than that of class Vehicle.
The notion of inheritance can be extended to include what is called "multiple inheritance." Multiple inheritance occurs when an class is created as the subclass of more than one class. Since the class inherits the characteristics from more than one class, objects of that class can be considered to be members of two or more classes at the same time. For example, consider the problem of representing an AquaTank in the example above AquaTanks are special Army vehicles that can run on the road, like Tanks and in the water like boats. Since an AquaTank is both a RoadVehicle and a WaterVehicle, we create a class, called AmphibiousVehicle that inherits from (is a sub class of) both RoadVehicle and WaterVehicle. This new class would have data about number-of-wheels as well as draft and displacement and may have additional special data as well. Objects of class AmphibiousVehicle will, thus, inherit the characteristics of both classes. As stated, this is called "multiple inheritance."
With single inheritance, the classes make up an inheritance tree. By adding multiple inheritance, the tree structure is generalized to a graph. FIG. 2A shows an inheritance graph.
Of the two most well known OOP environments, the "C++" environment and the "Smalltalk" environments, only the C++environment supports multiple inheritance. The C++environment is merely an extension to the existing "C" computer programming language. Hence, its approach to multiple inheritance, and to OOP in general, is extremely inflexible. Whenever data for a particular class of objects requires a change or whenever a method for a particular class of objects is to be added, all of the objects that are members of the changed class and all of the objects that are members of subclasses of the changed class must be recreated and their methods must be recompiled. Further, clients that depend upon objects of the changed class or upon objects which are members of a subclass of the changed class, must also be recompiled. While this may not seem particularly troublesome for the hypothetical example presented above, it is extremely costly and time consuming for large systems that include many classes and subclasses.
Essentially, then, the OOP environments of today greatly reduce the productivity advantages that were to be realized by the OOP approach.